Open
Conversation
- Created TransactionStatusMetaBuilder type for writing transaction metadata to the ledger - Created BlockReward type for block-level reward tracking - Added unix_timestamp (block_time) and rewards fields to SlotState - Updated unit tests to cover new fields and types
- Write TransactionStatusMeta for RPC getBlock/getTransaction - Store block rewards and unix timestamp when rooting slots - Add SPL token parsing and transaction cost model
…lumbing - Thread slot_block_time through clock sysvar updates so replay/rooting can access unix timestamps directly - Adjust getBlock handling to use stored block_time and tighten version checks - Add ExecutedTransaction.total_cost() and use it for CU accounting - Relax u8 index panics in transaction status inner-instruction/token balance builders - Minor cleanups/refactors across replay, cost model, and SPL token parsing
40fae04 to
72d8727
Compare
Specify std.atomic.Value(i64) type on slot_block_time declarations to fix type inference.
07d17c1 to
03340ef
Compare
…acks - Add confirmed commitment path matching Agave's two-phase lookup flow - Fall back to blockstore for block_time, block_height, and rewards when SlotTracker has pruned the slot - Fix Reward.fromLedgerReward to dupe pubkey string instead of parsing
Use unix_timestamp.load(.monotonic) for live slot data accuracy.
e7172e5 to
0568f9e
Compare
e00bb37 to
4e9d457
Compare
7d84370 to
8279fe0
Compare
11ab9b5 to
894fae1
Compare
- Add AccountKeys and ReservedAccountKeys for key segment iteration - Create parse_instruction module with parsers for known programs - Refactor transaction encoding with encodeWithOptions helper - Rename types to use Ui prefix for RPC wire format consistency - Fix transaction version handling in encodeTransactionWithMeta
- Update transaction version to use a labeled block - Rename SPL_ASSOCIATED_TOKEN_ACCOUNT_ID to SPL_ASSOCIATED_TOKEN_ACC_ID - Remove commented-out ParsedInstruction union code - Add doc comment for ParsedInstruction struct - Apply consistent formatting to pubkeyToValue calls
894fae1 to
481b662
Compare
…on metadata - Replace string pubkeys/hashes with typed Pubkey/Hash/Signature throughout - Add FallbackAccountReader to check both writes and account store for mints - Add custom jsonStringify methods for proper Agave-compatible serialization - Remove unnecessary manual memory freeing for typed fields - Fix inner instructions to use UiInstruction union type - Support all transaction encoding formats (binary/base58/base64/json)
2a3553d to
665392e
Compare
- Change UiInstruction.parsed to store a pointer instead of value - Add allocParsed helper to heap-allocate parsed instructions - Reduces union size by avoiding large inline struct
prestonsn
reviewed
Feb 25, 2026
prestonsn
reviewed
Feb 25, 2026
prestonsn
reviewed
Feb 25, 2026
prestonsn
reviewed
Feb 25, 2026
prestonsn
reviewed
Feb 25, 2026
prestonsn
reviewed
Feb 25, 2026
prestonsn
reviewed
Feb 25, 2026
204c63f to
90fdd5e
Compare
dnut
requested changes
Feb 26, 2026
- Resolve loaded writable/readonly keys from address lookups instead of using empty placeholders - Fix errdefer for owned_loaded_addresses in TransactionStatusMetaBuilder to free individual fields rather than the struct - Add missing errdefer for data allocations in FallbackAccountReader - Fix FallbackAccountReader.get parameter order (allocator, pubkey) - Remove stored allocator from StubAccount, pass explicitly on deinit
90fdd5e to
47b0463
Compare
- Add getRewardsAndNumPartitions to collect vote, stake, and fee rewards per slot - Thread reward_status and block_height through to distributeTransactionFees - Track distributed stake rewards during partition distribution - Store vote rewards in EpochRewardStatus for epoch boundary recording
- Deinit inner items of inner_instructions, pre/post_token_balances before freeing slices - Change pre/post token balance cleanup from defer to errdefer in Committer since ownership transfers to TransactionStatusMeta
- Add exactFloat helpers to format f64 with decimal point (e.g. "3.0" instead of "3e0") - Use number_string instead of float for uiAmount in parsed token balances - Update test expectation to reflect correct "1.0" serialization
- Deinit inner items of inner_instructions, pre/post_token_balances before freeing slices - Change pre/post token balance cleanup from defer to errdefer in Committer since ownership transfers to TransactionStatusMeta
cdf0a23 to
1890b73
Compare
… program - Add errdefer for inner instruction to prevent leak on append failure - Remove unnecessary dupe of log_messages, use meta field directly - Use allocator.dupe with inline array literals in system program helpers
…256r1 cost model
- Change resolveTokenBalances return type to error{OutOfMemory}- Use appendAssumeCapacity since list is pre-allocated to exact size
- Add catch null at Committer call sites to preserve existing behavior
- Enable secp256r1 precompile signature cost calculation in cost_model
- Minor style cleanups in spl_token helpers
- Add ED25519_VERIFY_STRICT_COST constant alongside existing ED25519_VERIFY_COST
- Add remove_simple_vote_from_cost_model to features.zon
- Gate simple vote static cost on remove_simple_vote_from_cost_model feature
- Pass feature_set and slot to cost model functions for feature-gated behavior
- Use strict ed25519 verify cost (2400 CU) only when feature is active, non-strict (2280 CU) otherwise
- Delete duplicate ReservedAccountKeys in rpc/parse_instruction - Add initAllActivated constructor to core ReservedAccounts - Add errdefer to initForSlot for proper cleanup on update failure - Change ACCOUNTS from slice to array type for use with .len - Update LoadedMessage and transaction.Message to use PubkeyMap(void) - Remove stale commented-out code in ParsedInstruction
- Remove LoadedMessage wrapper and its writable cache in favor of calling Message.isWritable with optional lookups - Remove duplicate isMaybeWritable/isWritableIndex/demoteProgramId helpers from Message - Simplify EncodedTransaction.binary to use anonymous struct (tuple) - Remove unused buildPartiallyDecoded function from parse_instruction - Reorder FinalizeStateParams fields for grouping clarity - Improve CPI instruction data clone comment to explain use-after-free risk
- Move LedgerHookContext from methods.zig to rpc/hook_contexts/Ledger.zig - Create rpc/hook_contexts/lib.zig module entry point - Update cmd.zig import path to use new module location - Move all associated tests to the new file
- Use colon-separated test name format (module.function: description) - Use camelCase for enum variants in TokenInstructionTag and TokenAuthorityType - Remove exhaustive enum sentinel values, rely on compiler exhaustiveness - Inline TokenAuthorityType methods as switch expressions at call site - Remove section separator comments, add agave reference links instead - Alphabetize and inline import aliases in parse_instruction
- Add parsers for all 14 token extension types (transferFee, confidentialTransfer, defaultAccountState, memoTransfer, etc.) - Add helper functions for reading OptionalNonZeroPubkey and COption<Pubkey> - Parse sub-instruction tags, account keys, and data fields per agave spec - Replace stub that returned DeserializationFailed for all extensions
- Rename allocator parameters to arena throughout Ledger and parse_instruction - Remove errdefer/defer free calls that are redundant with arena allocation - Convert tests to use ArenaAllocator instead of testing.allocator directly - Fix arena.reset() calls to not discard return value
- Break long function call arguments across multiple lines - Wrap info.put and parseSigners calls to stay within line limits - Reformat extension dispatch calls in parseTokenInstruction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
getBlockRPC methodImplementation
Notable Validator Changes
sig.core.transaction.Messagefor RPC encodingcost_unitsfield tosig.ledger.transaction_status.TransactionStatusMetaProcessedTransactionTransactionStatusMetaBuilderhelper type for writing transactions toLedgerspl_token.zigandcost_model.zigfor populatingcostUnitsandcomputeUnitsConsumedfieldsCommitter.commitTransactionsto write transactions toLedgerdistributeTransactionFeesto write rewards toLedgerupdateClockandupdateSysvarsForNewSlotto returnClockforblock_timewriting toLedgerprocessNextInstructionto only invoke non-precompile programsInstructionTraceentries with a depth greater than 1 to now be cleaned up byTransactionContextRPC Changes
parse_instructionmodule for handling transaction instruction parsingAccountKeys,LoadedMessage, andReservedAccountKeystypes inparse_instructionto better match testnet functionalitygetBlockand any future Ledger-related methodsRamifications
AccountKeys,LoadedMessage, andReservedAccountKeysshould be removed in favor of custom handling in encoding functions and utilizingsig.core.ReservedAccountsinstead, but should be done carefully to ensure no loss of functionality.parse_instructionmodule can be split up into modules instead all functions living inparse_instruction/lib.zig, while additionally creating concrete type definitions for each inline JSON object being constructed for each typeGetBlock.Responsetypes andgetBlockhelper functions should be moved into their ownparse_transactionorledger_codecmodule to separate RPC method logic from encoding/serializationTests